<#assign ctx=springMacroRequestContext.contextPath />
<#include "/macro/publicMacro.ftl">
<#import "/macro/pagination.ftl" as Pagination>
<#import "/macro/FormItem.ftl" as Form>

<@header title="ImUserGroupAss编辑">
    <link href="${ctx}/resource/frame/datetimepicker/jquery.datetimepicker.min.css" rel="stylesheet">
</@header>

<@body>
<h2 class="module-title">ImUserGroupAss编辑</h2>

<div class="alert alert-primary" role="alert">
    <button class="btn btn-info" onclick="javascript: history.back(-1);return false;" >返回</button>
</div>

<form class="form-horizontal" id="imUserGroupAssForm" action="${ctx}/imUserGroupAss/save" method="post">
    <input type="hidden" name="id" value="${imUserGroupAss.id}"/>
    <@Form.FormItem name="userId" label="用户id">
        <input type="text" class="form-control" name="userId" id="userId" aria-describedby="用户id" value="${imUserGroupAss.userId}">
    </@Form.FormItem>
    <@Form.FormItem name="groupId" label="群id">
        <input type="text" class="form-control" name="groupId" id="groupId" aria-describedby="群id" value="${imUserGroupAss.groupId}">
    </@Form.FormItem>
    <@Form.FormItem name="tenantId" label="租户Id">
        <input type="text" class="form-control" name="tenantId" id="tenantId" aria-describedby="租户Id" value="${imUserGroupAss.tenantId}">
    </@Form.FormItem>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary">提交</button>
        </div>
    </div>
</form>
</@body>

<@footer>
    <script src="${ctx}/resource/frame/datetimepicker/jquery.datetimepicker.full.min.js"></script>
    <script src="${ctx}/resource/common/js/jquery.validate.min.js"></script>

    <script type="text/javascript">
        $(function () {
        });

        $().ready(function() {
            $("#imUserGroupAssForm").validate({
                rules: {
                    id: {
                        required: true,
                        digits: true
                    },
                    userId: {
                        required: true,
                        digits: true
                    },
                    groupId: {
                        required: true,
                        digits: true
                    },
                    tenantId: {
                        required: true,
                        digits: true
                    }
                }
            });
        });
    </script>
</@footer>